package org.example.controller;

import org.example.Interface.entity.UserAddress;
import org.example.Interface.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class OrderController {

    @Autowired
    OrderService orderService;

    @ResponseBody
    @GetMapping("/initOrder{id}")
    public List<UserAddress> initOrder(@RequestParam("id") String id) {
        return orderService.initOrder(id);
    }
}

